package com.cxg.allsys.expertsys.controller;

import com.cxg.allsys.expertsys.pojo.Article;
import com.cxg.allsys.expertsys.pojo.TExpert;
import com.cxg.allsys.expertsys.service.IExpertsysService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/selectdat")
@RestController
@Slf4j
public class SelectDataConfig {

    @Autowired
    private IExpertsysService iExpertsysSevice;

    //查询文章
    @RequestMapping("/DataExpert")
    public List<Article> dataExpert(){
        return  iExpertsysSevice.selectdata();
    }

    @RequestMapping("/dataneirongExpert")
    public Article dataneirongExpert(Integer id){
        return  iExpertsysSevice.neirongdata(id);
    }
}
